lockPirce= 45.0
stockPrice= 30.0
barrelPrice = 25.0
totalLocks = 0
totalStocks = 0
totalBarrel = 0


locks =int(raw_input("请输入枪机数量："))
while(locks!=-1):
    stocks = int(raw_input("请输入枪托数量："))
    barrels = int(raw_input("请输入枪管数量："))

    totalLocks=totalLocks+locks
    totalStocks=totalStocks+stocks
    totalBarrel=totalBarrel+barrels
    locks =int(raw_input("请输入枪机数量："))

print("出售的枪机数量为：")
print totalLocks
print("出售的枪托数量为：")
print totalStocks
print("出售的枪管数量为：")
print totalBarrel

allsales = totalLocks*lockPirce+totalStocks*stockPrice+totalBarrel*barrelPrice
print("销售金额为：")
print allsales

if(allsales>1800):
    commission = (allsales -1800)*0.2 +800 * 0.15 + 1000*0.1
elif(allsales>1000):
    commission = (allsales -1000)*0.15 + 1000*0.1
else:
    commission = allsales *0.1

print("佣金为：")
print commissioncommissions